#include <graphics/MaterialManager.h>

namespace ne
{
    template<> MaterialManager* Singleton<MaterialManager>::mpInstance = 0;

    MaterialManager::MaterialManager()
    {
        mResourceType = "Material";
        std::cout << "Construct Material Manager\n";
    }

    MaterialManager::~MaterialManager()
    {
        std::cout << "Disconstruct Material Manager\n";
    }

    MaterialManager& MaterialManager::GetSingleton()
    {
        assert(mpInstance);
        return *mpInstance;
    }

    MaterialManager* MaterialManager::GetSingletonPtr()
    {
        return mpInstance;
    }

    Resource* MaterialManager::createImplement(const uint64_t id,
                                               const std::string &name,
                                               const std::string &fileName,
                                               const bool isManual,
                                               ManualResourceLoader *pLoader)
    {
        return new Material(this, id, name, fileName, isManual, pLoader);
    }
}
